import request from '@/utils/system/request'

/** 登录api */
export function loginApi(data: object) {
	return request({
		url: '/sys/auth/login',
		method: 'post',
		data
	})
}

/** 获取用户信息Api */
export function getInfoApi() {
	return request({
		url: '/sys/auth/info',
		method: 'post',
	})
}

/** 退出登录Api */
export function loginOutApi() {
	return request({
		url: '/sys/auth/logout',
		method: 'post',
	})
}

/** 修改用户密码 */
export function passwordChange(data: object) {
	return request({
		url: '/sys/user/updatePwd',
		method: 'put',
		data
	})
}

/** 获取登录后需要展示的菜单 */
export function getMenuApi() {
	return request({
		url: '/menu/list',
		method: 'post',
	})
}